package com.example.crawler.youtube.model;

/**
 * 视频转换结果
 *
 * @param <T>
 * @author fcxx1
 */
public class ConvertResult<T> {
    private static ConvertResult failure = new ConvertResult(false);
    private T data;
    private boolean success = false;
    private String converter;
    private String error;

    public ConvertResult() {

    }

    public ConvertResult(T data) {
        this.data = data;
    }

    public ConvertResult(boolean success) {
        this.success = success;
    }

    public static <T> ConvertResult<T> failure() {
        return failure;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getConverter() {
        return converter;
    }

    public void setConverter(String converter) {
        this.converter = converter;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }
}
